﻿using System.Net.DnsToolkit.Packet.Records;
using System.Net.DnsToolkit.Packet;

namespace System.Net.DnsToolkit.Serializer {
    /// <summary>
    /// Write Record into objects
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public interface IRecordWriter<T>  {

        /// <summary>
        /// QTypeEnum determines the type of record that will be read by the reader.
        /// eg. QTypeEnum.A creates RecordA, QTypeEnum.AAAA creates RecordAAAA
        /// </summary>
        /// <param name="qTypeEnum"></param>
        /// <returns></returns>
        QTypeEnum QTypeEnum {
            get;
        }
        
        /// <summary>
        /// Writes a record into destination object
        /// </summary>
        /// <param name="message"></param>
        /// <param name="destination"></param>
        void Write(IRecord record, T destination, ICompressionContext compression);
        
    }
}
